FROM python:3.8

RUN python -m pip install --upgrade pip
RUN pip3 install -i https://pypi.mirrors.ustc.edu.cn/simple/ uvicorn gunicorn uvloop

WORKDIR /app

# copy depencies project
COPY ./requirements.txt /app

# install
# RUN apt-get update && apt-get install -y cmake
RUN pip3 install -i https://pypi.mirrors.ustc.edu.cn/simple/ -r requirements.txt

COPY . /app

EXPOSE 8000

CMD ["python","server.py"]
#ENTRYPOINT ["python","server.py"]

# run project
#CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8080"]

# Run the start script, it will check for an /app/prestart.sh script (e.g. for migrations)
# And then will start Gunicorn with Uvicorn
#CMD ["/start.sh"]
